/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.avu.tp.assign2.question3.srp.conforms;

import com.avu.tp.assign2.question3.srp.conforms.Transaction;
import com.avu.tp.assign2.question3.srp.conforms.AccHolder;

/**
 *
 * @author Malotana
 */
public class Withdrawal implements Transaction{
    private AccHolder accHolder = new AccHolder();
    
    @Override
    public void execute() {
        
        System.out.printf(" Holder's Details:     %s %s\n", accHolder.getName(),accHolder.getAccNumber(), accHolder.getSurname());
        System.out.printf(" Your current balance is R%.2f\n", accHolder.getBalance());
        
        double newBalance = accHolder.getBalance() - 30;
        accHolder.setBalance(newBalance);
    }
}
